import { http } from "../plugin/request";

export const find = (_id: string) =>
  http.setRequest("GET", `/api/user/find?_id=${_id}`);

export const add = (body: { [key: string]: any }) =>
  http.setRequest("POST", `/api/user/add`, body);

export const deleteApi = (_id: string) =>
  http.setRequest("DELETE", `/api/user/delete?_id=${_id}`);

export const update = (_id: string, body: { [key: string]: any }) =>
  http.setRequest("PATCH", `/api/user/update?_id=${_id}`, body);
